<h1>Empleados del Centro de Consumo <%=h Centro.find(params[:id]).nombre_comercial %></h1>

<table>
  <tr>
    <th>Nombre Empleado</th>
    <th>Puesto</th>
    <% if perfil_admin? %>
      <th>Status</th>
    <% end %>
  </tr>
  <% for e in @instances %>
    <tr>
      <td><%=h e.nombre_completo %></td>
      <td><%=h Catalogo.valor('Puestos Empleados',e.puesto_id) %></td>
      <% if perfil_admin? %>
        <td><%= Catalogo.valor('Status Items', e.status_id) %></td>
        <td><%= link_to "Deshabilitar", :action => "deshabilitar", :id => e %></td>
      <% end %>
      <td><%= link_to "Consultar", :action => "show", :id => e %></td>
      <td><%= link_to "Editar", :action => "edit", :id => e %></td>
    </tr>
  <% end %>
</table>

<%= will_paginate @instances %>
<br />
<%= link_to "Nuevo empleado", :action => "new", :id => params[:id] %> |
<%= link_to "Regresar al Centro de Consumo", :controller => '/centro', :action => "show", :id => params[:id] %>